﻿<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="TinTuc.aspx.cs" Inherits="Admin_TinTuc" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table cellpadding="0" cellspacing="0" class="style2">
        <tr>
            <td align="center" colspan="2" 
                style="color: #333399; font-size: large; font-family: 'Times New Roman', Times, serif">
                <b>TIN TỨC</b></td>
        </tr>
        <tr>
            <td align="left" style="width: 58px">
                Tiêu đề:</td>
            <td align="left">
                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="left" style="width: 58px">
                Ngày:</td>
            <td align="left">
                Từ:<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
&nbsp;&nbsp; Đến:<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
&nbsp;<asp:Button ID="BtnTim" runat="server" onclick="BtnTim_Click" Text="Tim" Width="50px" />
            </td>
        </tr>
        <tr>
            <td align="center" colspan="2">
                <asp:Label ID="Label1" runat="server" 
                    style="color: #FF3300; font-style: italic; font-weight: 700; font-size: large"></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="left" colspan="2">
                <asp:GridView ID="GridView5" runat="server" AutoGenerateColumns="False" 
                                onrowcancelingedit="GridView5_RowCancelingEdit" 
                                onrowediting="GridView5_RowEditing" onrowupdating="GridView5_RowUpdating" 
                                DataKeyNames="MaTT,HinhAnh" AllowPaging="True" 
                                onrowdeleting="GridView5_RowDeleting" PageSize="3" 
                    BackColor="White" BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" 
                    CellPadding="4" onpageindexchanging="GridView5_PageIndexChanging" 
                    Width="100%">
                    <RowStyle BackColor="White" ForeColor="#003399" />
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:CheckBox ID="CB" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="MaTT" HeaderText="Mã Tin Tức" ReadOnly="True" />
                        <asp:BoundField DataField="TieuDe" HeaderText="Tiêu Đề" />
                        <asp:BoundField DataField="TomTat" HeaderText="Tóm Tắt" >
                            <ControlStyle Width="200px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="NgayDang" HeaderText="Ngày Đăng" />
                        <asp:BoundField DataField="Noidung" HeaderText="Noi Dung" />
                        <asp:BoundField DataField="TacGia" HeaderText="Tác Giả" />
                        <asp:TemplateField HeaderText="Hình Ảnh">
                            <EditItemTemplate>
                                &nbsp;
                                <asp:FileUpload ID="FileUpload1" runat="server" />
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Image ID="Image1" runat="server" 
                                    ImageUrl='<%# Eval("HinhAnh","~/Pictures/HinhTT/{0}") %>' Width="100px" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:CommandField ShowEditButton="True" HeaderText="Sửa" />
                        <asp:CommandField ShowDeleteButton="True" HeaderText="Xóa" />
                    </Columns>
                    <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
                    <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
                    <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
                    <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
                </asp:GridView>
                        </td>
        </tr>
        <tr>
            <td align="center" colspan="2">
&nbsp;<asp:Button ID="Button2" runat="server" Text="Delete" Width="66px" 
                    onclick="Button2_Click" />
&nbsp;<asp:Button ID="Button3" runat="server" onclick="Button3_Click" Text="Add" Width="66px" />
            </td>
        </tr>
    </table>
</asp:Content>

